package se480.tracker.tracker;

/**
 * Represents a client loc in x & y coordinates.
 * This is what is stored by the Tracking System
 * 
 * @author mmichalak
 *
 */
public class Location implements Cloneable{

	int tick;
	int xCoord;
	int yCoord;
	
	
	public int getxCoord() {
		return xCoord;
	}
	public void setxCoord(int xCoord) {
		this.xCoord = xCoord;
	}
	public int getyCoord() {
		return yCoord;
	}
	public void setyCoord(int yCoord) {
		this.yCoord = yCoord;
	}
	public int getTick() {
		return tick;
	}
	public void setTick(int tick) {
		this.tick = tick;
	}
	
	@Override
	protected Object clone() throws CloneNotSupportedException {
		Location loc = (Location)super.clone();
		loc.setTick(this.tick);
		loc.setxCoord(this.xCoord);
		loc.setyCoord(this.yCoord);
		
		return loc;
	}
	
	@Override
	public String toString() {
		return "Location [tick=" + tick + ", xCoord=" + xCoord + ", yCoord="
				+ yCoord + "]";
	}
	
	
}
